home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Resources / Chat & Communication / Digsby build 37 / digsby_setup.exe / lib / M2Crypto / SSL / timeout.pyo (.txt) < prev   
Python Compiled Bytecode  |  2008-10-13  |  971b  |  24 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.5)
  3.  
  4. import struct
  5. from M2Crypto import m2
  6. DEFAULT_TIMEOUT = 600
  7.  
  8. class timeout:
  9.     
  10.     def __init__(self, sec = DEFAULT_TIMEOUT, microsec = 0):
  11.         self.sec = sec
  12.         self.microsec = microsec
  13.  
  14.     
  15.     def pack(self):
  16.         return struct.pack('ll', self.sec, self.microsec)
  17.  
  18.  
  19.  
  20. def struct_to_timeout(binstr):
  21.     (s, ms) = struct.unpack('ll', binstr)
  22.     return timeout(s, ms)
  23.  
  24.